import java.util.ArrayList;

public class Delete_str {
    public static void main(String[] args) {
        String str1 = "welcome to work";
        String str2 = "come";
        ArrayList<Character> ret = new ArrayList<>();

        for (int i = 0; i < str1.length(); i++){
            char ch = str1.charAt(i);
            if(!str2.contains(ch+"")){
                ret.add(ch);
            }
        }
        for(int i = 0; i < ret.size(); i++){
            System.out.println(ret.get(i));;
        }
    }


}
